package Java8.stream;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class Test {

  public static void main(String[] args) {

    List<CRUD> clist = new ArrayList<CRUD>();
    CRUD c0 = new CRUD();
    //c0.setC(1);
    clist.add(c0);

    CRUD c2 = new CRUD();
    //c2.setD(1);
    clist.add(c2);

    List<CRUD> n = clist.stream().filter(c -> c.getC() == 1 || c.getD() == 1 || c.getRr() == 1 || c.getU() == 1)
        .collect(Collectors.toList());

    System.out.println(n.size());
    System.out.println(1 & 2);
  }

}
